﻿namespace WomanMotion.WebApi.Api.Utility
{
    /// <summary>
    /// 控制器和Action 说明特性
    /// </summary>
    public class DescriptionNameAttribute : Attribute
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="name"></param>
        public DescriptionNameAttribute(string name)
        {
            Name = name;
        }
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="name">名称</param>
        /// <param name="isRoute">是否在前端路由</param>
        /// <param name="rank">排序权重</param>
        public DescriptionNameAttribute(string name,bool isRoute,int rank)
        {
            Name = name;
            IsRoute = isRoute;
            Rank = rank;
        }
        public DescriptionNameAttribute(string name, bool isRoute, string routeTitle,string routePath,string routeCode)
        {
            Name = name;
            IsRoute = isRoute;
            RouteTitle = routeTitle;
            RoutePath = routePath;
            RouteCode = routeCode;
        }

        /// <summary>
        /// 名称
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// 菜单排序权重
        /// </summary>
        public int? Rank { get; set; }
        /// <summary>
        /// 是否是前端路由
        /// </summary>
        public bool IsRoute { get; set; }
        /// <summary>
        /// 路由标题
        /// </summary>
        public string? RouteTitle { get; set; }
        /// <summary>
        /// 路由路径
        /// </summary>
        public string? RoutePath { get; set; }
        /// <summary>
        /// 路由代码
        /// </summary>
        public string? RouteCode { get; set; }

    }
}